#ifndef _STMFLASH_H_
#define _STMFLASH_H_

#include "stm32f1xx_hal.h"

#define STM32_FLASH_SIZE    64        // MCU FLASH容量
#define STM32_FLASH_WREN    1         // FLASH写入使能

/* 函数声明 */
uint16_t STMFLASH_ReadHalfWord(uint32_t faddr);
void STMFLASH_Read(uint32_t ReadAddr, uint16_t *pBuffer, uint16_t NumToRead);
void STMFLASH_Write_NoCheck(uint32_t WriteAddr, uint16_t *pBuffer, uint16_t NumToWrite);
void STMFLASH_Write(uint32_t WriteAddr, uint16_t *pBuffer, uint16_t NumToWrite);
void Test_Write(uint32_t WriteAddr, uint16_t Write_Data);

#endif
